import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from "../views/home"
import Viedeo from "../views/video"
import  Smaallvideo from "../views/smallvideo"
import Show from "../views/show"
import My from "../views/my"
Vue.use(VueRouter)

const routes = [
  {
    path: '/home', // 配置路由名字
    name: 'home', 
    component: Home// 匹配path里路径得时候去渲染哪一个组件
  },
  {
     path:"/video",
     component:Viedeo
  },
  {
    path:"/smallvideo",
    component:Smaallvideo

  },
  {
    path:"/show",
    component:Show
  },
  {
    path:"/my",
    component:My
  }
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
